home *** CD-ROM | disk | FTP | other *** search
- /*==================================================================
- File: APLocation.h
-
- Contains: An AirPort Location Manager module.
-
- Written by: Ned Holbrook and Eric Gundrum
-
- Copyright: None
- ==================================================================*/
-
- /*
- File: Sample.h
-
- Contains: Location Manager SDK Sample Module Rez/C includes
-
- Version: ALM SDK 2.0
- Package: Location Manager SDK 2.0
-
- Copyright: © 1996-1997 by Apple Computer, Inc.
- All rights reserved.
-
- Bugs?: Please include the the file and version information (from above) with
- the problem description. Developers belonging to one of the Apple
- developer programs can submit bug reports to:
-
- devsupport@apple.com
-
- */
-
- #ifndef __SAMPLE__
- #define __SAMPLE__
-
- // -------------------------------------------------------------------------------------------------
-
- #ifdef REZ
-
- #include "Types.r"
-
- #else
-
- #include <Types.h>
-
- #endif // REZ
-
- // -------------------------------------------------------------------------------------------------
-
- // Errors...
-
- #define kSampleErrStrRsrcID 10000
- #define kSampleImportPrefDatesIdx 1
- #define kSampleCouldNotQuitIdx 2
- #define kSampleBiggestKnownIdx kSampleCouldNotQuitIdx
-
- // Other text...
-
- #define kSampleMiscStrRsrcID 10001
- #define kSampleDescribeTemplateIdx 1
-
- // Constants for common use...
-
- #define kAppListNeverQuit 0x00
- #define kAppListQuitOnSet 0x80
- #define kAppListQuitOnGet 0x40
- #define kAppListQuitOnGetOrSet 0xC0
- #define kAppListLaunchFromEdit 0x20
-
- #define kNoRestart 0x00
- #define kRestartIfChanged 0x80
-
- #define kExecutableRsrcType 'code'
- #define kExecutableRsrcID 10000
-
- #define kNameRsrcType 'STR '
- #define kNameRsrcID 10000
-
- #define kDescRsrcType 'STR '
- #define kDescRsrcID 10001
-
- #define kIconRsrcType 'ICON'
- #define kIconRsrcID 10000
-
- #define kAppsRsrcType 'apps'
- #define kAppsRsrcTypeString "apps"
- #define kAppsQuitRsrcID 10000
- #define kAppsEditRsrcID 10001
-
- #define kFilesRsrcType 'fils'
- #define kFilesRsrcTypeString "fils"
- #define kFilesRsrcStartID 10000
-
- #define kRestartRsrcType 'rstr'
- #define kRestartRsrcTypeString "rstr"
- #define kRestartRsrcStartID 10000
-
- #define kGetInfoRsrcID 10000
-
- #define kEditMessageRsrcID 10000
- #define kEditOpenButton 1
- #define kEditCancelButton 2
- #define kEditApplyButton 3
-
- // -------------------------------------------------------------------------------------------------
-
- // A bunch of structures we keep in resources; do the rez versions first, then the C versions...
-
- #ifdef REZ
-
- // Resource types for this project...
-
- type 'TMPL' {
- wide array Fields {
- pstring; // field name
- string[4]; // field type
- };
- };
-
- type kAppsRsrcType {
- integer = $$CountOf (AppArray);
- array AppArray {
- string[4]; // Application to quit
- unsigned hex byte
- neverQuit = kAppListNeverQuit,
- quitOnSet = kAppListQuitOnSet,
- quitOnGet = kAppListQuitOnGet,
- quitOnGetOrSet = kAppListQuitOnGetOrSet,
- launchFromEdit = kAppListLaunchFromEdit;
- align word;
- };
- };
-
- type kFilesRsrcType as 'STR ';
-
- type kRestartRsrcType {
- unsigned hex byte
- dontRestart = kNoRestart,
- doRestart = kRestartIfChanged;
- align word;
- };
-
- #else
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif // PRAGMA_ALIGN_SUPPORTED
-
- // (Do not require an analog for 'TMPL')
-
- typedef struct {
- OSType applicationCode;
- UInt8 flags;
- UInt8 filler1;
- } ApplicationEntry;
-
- typedef struct {
- SInt16 applicationCount;
- ApplicationEntry applications[kVariableLengthArray];
- } ApplicationListRec, *ApplicationListPtr, **ApplicationListHandle;
-
- typedef struct {
- Str255 fileName;
- } FileEntryRec, *FileEntryPtr, **FileEntryHandle;
-
- typedef struct {
- UInt8 flags;
- UInt8 filler1;
- } FileFlagsRec, *FileFlagsPtr, **FileFlagsHandle;
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif // PRAGMA_ALIGN_SUPPORTED
-
- #endif // REZ
-
- // -------------------------------------------------------------------------------------------------
-
- #endif // __SAMPLE__
-